﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NLBS.Entity" assembly="NLBS.Entity">
  <class name="Photo" table="blog_Photo">
   
    <id name="PhotoID" column="photo_Id" type="Guid">
      <generator class="guid" />
    </id>
    <discriminator column="PhotoType" type="string"></discriminator>
    
    <!--<property name="Name" column="photo_Name" type="String" />-->
    <component name="Name" class="PhotoName">
      <!-- class attribute optional -->
      <property name="FirstName"/>
      <property name="LastName"/>
    </component>

    <subclass name="ComputerPhoto" discriminator-value="Computer"></subclass>
    <subclass name="ChildrenPhoto" discriminator-value="Children"></subclass>

    <subclass name="EnglishPhoto" discriminator-value="English">
      <join table="EnglishPhoto">
        <key column="photo_Id"/>
        <property name="BookName" column="bookName"></property>
      </join>
    </subclass>
    
    <!--<joined-subclass name="EnglishPhoto" table="EnglishPhoto">
     
    </joined-subclass>-->
    
  </class>
</hibernate-mapping>